**
** Like a range but with a variable step amount.
**
** Also contains static convenience functions for mapping and stepping of counts and ranges.
**
const class Step {

	**
	** A constant to make it easy to choose all values.
	**
	static const Step all := Step()

	**
	** TODO Consider changing this to raw data to avoid double objects? Would also need a ctor without the range object ...
	**
	const Range range

	const Int step

	new make(Range range := 0..-1, Int step := 1) {
		this.range = range
		this.step = step
	}

	static List mapTimes(Type of, Int count, |Int -> Obj?| gen) {
		result := List(of, count);
		count.times {
			result.add(gen(it))
		}
		return result
	}

}
